package com.proyemp.entity.classes;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * The primary key class for the gastos_programas database table.
 * 
 */
@Embeddable
public class GastosProgramaPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="nro_programa")
	private Integer nroPrograma;

	@Column(name="gastos_id")
	private Integer gastosId;

    public GastosProgramaPK() {
    }
	public Integer getNroPrograma() {
		return this.nroPrograma;
	}
	public void setNroPrograma(Integer nroPrograma) {
		this.nroPrograma = nroPrograma;
	}
	public Integer getGastosId() {
		return this.gastosId;
	}
	public void setGastosId(Integer gastosId) {
		this.gastosId = gastosId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof GastosProgramaPK)) {
			return false;
		}
		GastosProgramaPK castOther = (GastosProgramaPK)other;
		return 
			this.nroPrograma.equals(castOther.nroPrograma)
			&& this.gastosId.equals(castOther.gastosId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.nroPrograma.hashCode();
		hash = hash * prime + this.gastosId.hashCode();
		
		return hash;
    }
}